<template>
    <fieldset>
        <legend>
            其他组件
            <h1>{{userStore.username}}</h1>
            <h1>{{reverseName}}</h1>
            <h1>{{newArr}}</h1>
            <ul>
                <li v-for="item in data" :key="item.id">{{item.title}}</li>
            </ul>
        </legend>
    </fieldset>
</template>
<script setup>
    import {useUser} from "../store/users"
    import {storeToRefs } from "pinia"
    let userStore = useUser()
    let {reverseName,newArr,newCount,data} = storeToRefs(userStore)

    userStore.fetch_data(1,2)
</script>